Umask usage
A What is umask?
When we log on to the system and create a file, there is always a default permission. How does this permission come from? This is what umask does. Umask sets the default permission for the user to create files, which is
umask How to usea what is Umask? when we log into the system and create a file that always has a default permission, how does this permission come from? That's what Umask did. Umask set the user to create the default permissions of the file, it is
Recently just the system to learn the Linux file permissions this piece, in the "Umask value and its corresponding file permissions" on this issue, looked for video (old boy teacher's video, highly recommended), also looked at the bird Brother's
umask --Indicates the default permissions when creating a file (that is, it does not need to be set when creating a file)
For example, we found under root user , touch A, the default permission for file A is 644 under Normal user ,
In Linux, when a new file is created, the system defaults to rw-rw-rw-, the new file does not have permissions for all users, and if you want to add execute permissions for all users, you can use "$CHOMD u+x,g+x,o+x filename" to do so. However, if a
Command format:umask nnn (nnn on behalf of number 000-777)
Command function:umask permissions complement, the role is to set the default directory or file permissions with. The default value is 022, at which point the default permissions for the
What this section says:- 7.1文件的基本权限:r w x (UGO)- 7.2文件的特殊权限:suid sgid sticky和文件扩展权限ACL- 7.3实战:创建一个让root都无法删除的文件- 7.1 文件的基本权限- 7.1.1 权限的作用The following three types of access restrictions can be reached by setting permissions on a file:
Allow
In the end of the second phase of the Canton Fair Internship, and ushered in a few days of leisure, continue to learn Linux. In the previous essay on Linux learning CentOS (17)--some important commands related to Linux file and directory management,
"7.1" Directory and Path"7.1.2" directory-related actions
1 Special Directory list:
(1)
2 Directory Operation command, let's talk about a few common processing directory commands bar:
CDS: Transforming Catalogs
PWD: Displaying the current
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.